.toolbar {
    position: fixed;
    left: 0;
    top: 0;
    width: 50px;
    height: 100vh;
    background-color: #333;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 10px;
    box-sizing: border-box;
    z-index: 2;
}

/* Base button styles for unified appearance */
.btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn:hover {
    background-color: #555;
}

.btn:focus {
    outline: none;
    box-shadow: 0 0 3px rgba(0, 123, 255, 0.3);
}

.btn:active {
    transform: translateY(1px);
}

/* Toolbar button variant */
.btn-toolbar {
    width: 40px;
    height: 40px;
    margin: 2px 0;
    font-size: 20px;
    position: relative;
}

.btn-toolbar.active {
    background-color: #007bff;
}

.toolbar button {
    width: 40px;
    height: 40px;
    margin: 2px 0;
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    border-radius: 5px;
    position: relative;
}

.toolbar button:hover {
    background-color: #555;
}

.toolbar button.active {
    background-color: #007bff;
}

.toolbar .divider {
    width: 80%;
    height: 1px;
    background-color: #666;
    margin: 10px 0;
}

.dropdown {
    position: absolute;
    left: 50px;
    background-color: #444;
    min-width: 120px;
    display: none;
    z-index: 100;
}

.dropdown.show {
    display: block;
}

.dropdown div {
    padding: 10px;
    color: white;
    cursor: pointer;
}

.dropdown div:hover {
    background-color: #666;
}

.tree-panel {
    position: fixed;
    left: 50px;
    top: 0;
    max-width: 30vw;
    min-width: 20vw;
    height: 100vh;
    background-color: #2a2a2a;
    color: white;
    display: none;
    padding: 10px;
    box-sizing: border-box;
    overflow-y: auto;
    overflow-x: auto;
}

.tree-panel.show {
    display: block;
}



.tree-panel .button-container {
    display: flex;
    justify-content: flex-end;
    gap: 5px;
    margin-bottom: 10px;
    padding: 5px 0;
    border-bottom: 1px solid #444;
}

/* Small button variant for tree panel */
.btn-small {
    width: 20px;
    height: 20px;
    font-size: 12px;
    background-color: #555;
}

.btn-small:hover {
    background-color: #777;
}

.tree-panel .return-btn,
.tree-panel .logout-btn,
.tree-panel .download-btn {
    width: 20px;
    height: 20px;
    background-color: #555;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 12px;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tree-panel .return-btn:hover,
.tree-panel .logout-btn:hover,
.tree-panel .download-btn:hover {
    background-color: #777;
}

.tree-node {
    padding: 5px 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.tree-node:hover {
    background-color: #444;
}

.tree-node .tree-icon {
    margin-right: 5px;
    font-size: 14px;
    min-width: 14px;
}

.tree-node .tree-label {
    font-size: 14px;
    flex-grow: 1;
}

.tree-node .tree-toggle {
    margin-right: 5px;
    font-size: 12px;
    width: 12px;
    text-align: center;
}

.tree-node .tree-toggle::before {
    content: '\f0da';
    /* Right arrow (collapsed) */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
}

.tree-node.expanded .tree-toggle::before {
    content: '\f0d7';
    /* Down arrow (expanded) */
}

.tree-node.leaf .tree-toggle {
    visibility: hidden;
}

.tree-children {
    margin-left: 20px;
    display: none;
}

.tree-node.expanded .tree-children {
    display: block;
}

.config-panel {
    position: absolute;
    left: 50px;
    background-color: #444;
    padding: 10px;
    display: none;
    z-index: 100;
}

.checkbox-container {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    color: white;
    font-size: 12px;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 8px;
}

.input-container {
    margin: 10px 0;
}

.input-container input[type="text"] {
    width: 150px;
    padding: 5px;
    border: 1px solid #666;
    border-radius: 3px;
    background-color: #333;
    color: white;
    font-size: 12px;
}

.input-container input[type="text"]::placeholder {
    color: #999;
}

.input-container input[type="text"]:focus {
    outline: none;
    border-color: #007bff;
}

/* Action button variant */
.btn-action {
    padding: 5px 10px;
    background-color: #007bff;
    font-size: 12px;
    margin: 5px 0;
    font-weight: 500;
}

.btn-action:hover {
    background-color: #0056b3;
}

.action-btn {
    padding: 5px 10px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
    margin: 5px 0;
}

.action-btn:hover {
    background-color: #0056b3;
    cursor: pointer;
}

.config-panel.show {
    display: block;
}

.color-wheel {
    width: 100px;
    height: 100px;
    cursor: crosshair;
    margin-bottom: 10px;
    /* image-rendering: pixelated; */
}

.slider-container {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.slider {
    width: 100px;
    margin-right: 10px;
}

/* Select element styling to match unified button system */
.select {
    background-color: #555;
    color: white;
    border: 1px solid #666;
    border-radius: 4px;
    padding: 2px 5px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.select:hover {
    background-color: #666;
    border-color: #777;
}

.select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 3px rgba(0, 123, 255, 0.3);
}

.slider-container select {
    width: 100px;
    margin-right: 10px;
    background-color: #555;
    color: white;
    border: 1px solid #666;
    border-radius: 3px;
    padding: 2px 5px;
    font-size: 12px;
    cursor: pointer;
}

.slider-container select:hover {
    background-color: #666;
    border-color: #777;
}

.slider-container select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 3px rgba(0, 123, 255, 0.3);
}

.slider-label {
    color: white;
    font-size: 12px;
}

.brush-preview {
    border-radius: 50%;
    display: inline-block;
    vertical-align: middle;
}

.tree-node.selected{
    background-color: #007bff;
}
.tree-node.useless_selected{
    background-color: #ff0000;
}

.config-panel{
    color: white;
    font-size: 16px;
}

.find-results-info {
    margin: 10px 0;
    font-size: 12px;
    color: #ccc;
    text-align: center;
    padding: 5px 0;
    border-top: 1px solid #666;
    border-bottom: 1px solid #666;
}

.find-navigation {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 10px;
}

.find-navigation .btn-small {
    width: 25px;
    height: 25px;
    background-color: #555;
    border: 1px solid #666;
    border-radius: 3px;
    color: white;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.find-navigation .btn-small:hover {
    background-color: #007bff;
    border-color: #007bff;
}

.find-navigation .btn-small:active {
    transform: translateY(1px);
}

.find-navigation .btn-small:focus {
    outline: none;
    box-shadow: 0 0 3px rgba(0, 123, 255, 0.3);
}